let navLi = document.querySelectorAll('.tilteList>li');
let main = document.querySelectorAll('.main');
// let tilteList=document.querySelector('.tilteList');
// let lastindex=0

navLi.forEach(function (item, index) {

    item.addEventListener('mouseenter', function () {
        main[index].style.display = 'flex'
        main[index].style.height = '180px'
        main.forEach(function (item2, index2) {
            item2.style.display = 'none'
        })
        main[index].style.display = 'flex'
    })
    item.addEventListener('mouseleave', function () {
        main.forEach(function (item2, index2) {
            item2.style.display = 'flex'
        })
        main[index].style.height = '0px'
       
    }                                      )
})

